package eu.horyzont.systemyrozproszone.systemmagazynowy.serwer.session;

import eu.horyzont.systemyrozproszone.systemmagazynowy.serwer.Utils;
import eu.horyzont.systemyrozproszone.systemmagazynowy.serwer.session.Session;
import eu.horyzont.systemyrozproszone.systemmagazynowy.serwer.entities.Entity;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Properties;
import org.apache.log4j.Logger;

public class SessionImpl implements Session {
    
    private final hu.netmind.beankeeper.Store store;
    
    public SessionImpl(String driverClass, String url) {
        store = new hu.netmind.beankeeper.Store(driverClass, url);
    }

    @Override
    public Entity findSingle(String statement) {
        return (Entity)store.findSingle(statement);
    }

    @Override
    public Entity findSingle(String statement, Object... parameters) {
        return (Entity)store.findSingle(statement, parameters);
    }

    @Override
    public List<Entity> find(String statement, Object... parameters) {
        return store.find(statement, parameters);
    }

    @Override
    public List<Entity> find(String statement) {
        return store.find(statement);
    }

    @Override
    public void remove(Entity obj) {
        store.remove(obj);
    }

    @Override
    public void save(Entity obj) {
        store.save(obj);
    }
    
    
    
}
